package com.ruoyi.mapper;

import com.ruoyi.pojo.ResultCompetition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author kaka.huang
 * @for study
 */
@Mapper
public interface CompetitionMapper {
    // 竞赛成绩全查询接口
    @Select("SELECT game_record.game_id, game_record.game_time, game_record.game_name, game_record.game_result, game_record.top, game_record.certificate, member_info.name " +
            "FROM game_record " +
            "LEFT JOIN game_member_mapping ON game_record.game_id COLLATE utf8mb4_0900_ai_ci = game_member_mapping.game_id COLLATE utf8mb4_0900_ai_ci " +
            "LEFT JOIN member_info ON game_member_mapping.member_id COLLATE utf8mb4_0900_ai_ci = member_info.member_id COLLATE utf8mb4_0900_ai_ci")
    List<ResultCompetition> selectCompetitionMapper();
}
